import Taro from "@tarojs/taro";
import { View } from "@tarojs/components";
import { AtActivityIndicator } from "taro-ui";

const PageLoad = props => {
  const {content} = props

  const styles = {
    position: "fixed",
    top: 0,
    left: 0,
    width: "100vw",
    height: "93vh",
    zIndex: "100",
    background: "rgba(0,0,0,.1)"
  };

  return (
    <View style={styles}>
      <AtActivityIndicator
        mode="center"
        color="#386FF0"
        content={content || "loading......"}
        size={32}
      ></AtActivityIndicator>
    </View>
  );
};

export default PageLoad;
